package com.eascs.admin.o2o.badloan.service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.eascs.admin.common.vo.ModelResult;
import com.eascs.admin.o2o.badloan.entity.O2oCacleEntity;
import com.eascs.admin.o2o.loan.entity.O2oLoanapplyEntity;
@Service
public class IO2oCancleServiceimpl implements IICancelService{
	@Autowired
	IO2oCancleService iO2oCancleService;
	/**
	 * loan-13099 单据驳回5个工作日内自动作废
	 * @param entity
	 * @return
	 */
	public ModelResult<Boolean> ItypeBHCancle(O2oLoanapplyEntity entity){
		O2oCacleEntity cacle = new O2oCacleEntity();
		cacle.setLoanapplyNo(entity.getLoanapplyNo());
		cacle.settOperno("10000");
		cacle.settOpername("系统自动作废");
		cacle.settTime(new Date());
		cacle.settType(entity.getWfType());
		cacle.settRemark("贷款申请超时作废(驳回5个工作日内未提交自动作废)");
		cacle.settIsSuccess("N");
		cacle.settSysType("ST");// 自动作废类型
		return iO2oCancleService.IworlFlowCancle(cacle);
	}
}
